<template>
  <div>
    <van-nav-bar
      right-text="管理"
      left-arrow
      @click-left="goBack"
      @click-right="edit"
    />
    <van-cell-group v-if="listData.length>0">
      <van-cell v-for="(item,index) in listData" :key="index" :value="item" @click="toChat(item)" />
    </van-cell-group>
    <div v-else class="notice">尚未添加常用语</div>
  </div>
</template>
<script>
  export default {
    data() {
      return {
        listData: []
      }
    },
    methods: {
      getList() {
        this.listData = ['撒哥都说过程序，撒哥都说过程序撒哥都说过程序，撒哥都说过程序，撒哥都说过程序','撒哥都说过程序，撒哥都说过程序']
      },
      toChat(value) {
        console.log(value)
      },
      goBack() {
        
      },
      edit() {
        this.$router.push({name:'phraseEdit'})
      }
    },
    created() {
      this.getList()
    }
  }
</script>
<style>
.notice {
  text-align: center;
  margin-top: 10rem;
}
</style>